import React, {Component} from 'react';
import {Redirect} from "react-router-dom" ;
import memoryUtils from "../../utils/memoryUtils";

class Home extends Component {
    render() {
        const {user} = memoryUtils
        if (!user || !user.user_id) {
            return <Redirect to={'/login'}/>
        }
        return (
            <div>
                Hello {user.name}
            </div>
        );
    }
}

export default Home;